﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlPhanChiaDoanhSo.ascx.cs" Inherits="UserControl_ControlPhanChiaDoanhSo" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<script type="text/javascript">



    function pageLoad() {



        $(".direct_margin_topbottom").click(function () {

            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });

        });
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }

    }

</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div class="direct_container_right_titletop">
            Phân chia doanh số cho TDV
        </div>
        <hr />
        <!-- Button chuc nang-->
        <div class="direct_container_main">
        </div>   
         
        <div class="direct_container_form_right">
         <table border="0" width="100%">
                        
                        <tr>
                        <td>Đây là danh sách những trình dược viên ảo trong hệ thống</td>
                        </tr>
                        <tr>
                        <td>
                            <asp:GridView ID="grvTDV" runat="server" AutoGenerateColumns="False" 
                                        onrowcommand="grvTDV_RowCommand" 
                                        
                                         DataKeyNames="FrSalesKey" EnableModelValidation="True">
                                         <Columns>
                            <asp:TemplateField HeaderText="Stt">
                                <HeaderTemplate>
                                                                    STT
                                                                
                                         
                                </HeaderTemplate>
                            <ItemTemplate>
                                                                    <%# Container.DataItemIndex + 1 %>
                                                                
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="50px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Mã TDV"><HeaderTemplate>
                                                                   Mã TDV
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                  
                  <asp:Label ID="lblsalesp_key" runat="server" Text='<%# Eval("FrSalesKey")%>'></asp:Label>                                               
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="100px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Họ tên"><HeaderTemplate>
                                                                   Họ tên
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblsalesp_name" runat="server" Text='<%# Eval("salesp_name")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="250px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="250px" />
</asp:TemplateField>

<asp:TemplateField HeaderText="Tuyến trên"><HeaderTemplate>
                                                                   Báo cáo cho
                                                                
</HeaderTemplate>
<ItemTemplate>
                                                                   
                    <asp:Label ID="lblRecommender" runat="server" Text='<%# Eval("TuyenTren")%>'></asp:Label>                                             
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" Width="250px" />

<ItemStyle Height="40px" HorizontalAlign="Left" Width="250px" />
</asp:TemplateField>





<asp:TemplateField HeaderText="Xem chi tiết">

                                                                 <ItemTemplate>
                                                                    <asp:ImageButton ID="imgBtnChon" runat="server" CausesValidation="False" 
                                                                    CommandName="chon" Height="20px" ImageUrl="~/Images/check.png" />
                                                                </ItemTemplate>
                                                                <ControlStyle BackColor="White" BorderColor="White" />
                                                                <FooterStyle BackColor="White" BorderColor="White" />
                                                               <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                                                <ItemStyle BackColor="White" HorizontalAlign="Center" BorderColor="White" />
                                                            </asp:TemplateField>
</Columns>
</asp:GridView>
                        </td>
                        </tr>
        </table>
        </div>
            

      </ContentTemplate>
 </asp:UpdatePanel>